package cn.stylefeng.guns.modular.basic.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.basic.entity.BasicArea;
import cn.stylefeng.guns.modular.basic.model.params.BasicAreaParam;
import cn.stylefeng.guns.modular.basic.model.result.BasicAreaResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 库区表 服务类
 */
public interface BasicAreaService extends IService<BasicArea> {

    /**
     * 新增
     *
     * @author zhucx
     * @Date 2019-07-01
     */
    void add(BasicAreaParam param);

    /**
     * 删除
     *
     * @author zhucx
     * @Date 2019-07-01
     */
    void delete(BasicAreaParam param);

    /**
     * 更新
     *
     * @author zhucx
     * @Date 2019-07-01
     */
    void update(BasicAreaParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-01
     */
    BasicAreaResult findBySpec(BasicAreaParam param,Long deptId,Long operateId);

    /**
     * 查询列表，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-01
     */
    List<BasicAreaResult> findListBySpec(BasicAreaParam param,Long deptId,Long operateId);

    /**
     * 查询分页数据，Specification模式
     *
     * @author zhucx
     * @Date 2019-07-01
     */
     LayuiPageInfo findPageBySpec(BasicAreaParam param,String condition,Long deptId,Long operateId);

	List<BasicArea> listByDeptId(Long deptId);

	/**
	 * 查询可选择库区
	 * @param deptId
	 * @param deliverId
	 * @return
	 */
	List<BasicAreaResult> findAvailableList(Long deptId, Long deliverId,Long operateId);

}
